


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
  <title>Coverage Report :: Recipe</title>
  <style type="text/css">
    @import "../../.css/coverage.css";
  </style>
</head>

<body>
<div class="header"></div>

<div class="content">
<div class="breadCrumbs">
    [ <a href="../../index.html">all classes</a> ]
    [ <a href="../index.html">edu.ncsu.csc326.coffeemaker</a> ]
</div>

<h1>Coverage Summary for Class: Recipe (edu.ncsu.csc326.coffeemaker)</h1>

<table class="coverageStats">
<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Class, %
</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">Recipe</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (1/ 1)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    60%
  </span>
  <span class="absValue">
    (9/ 15)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    56,8%
  </span>
  <span class="absValue">
    (21/ 37)
  </span>
</td>
</tr>

</table>

<br/>
<br/>


<div class="sourceCode"><i>1</i>&nbsp;package edu.ncsu.csc326.coffeemaker;
<i>2</i>&nbsp;
<i>3</i>&nbsp;/**
<i>4</i>&nbsp; * 
<i>5</i>&nbsp; * @author Sarah E. Smith
<i>6</i>&nbsp; *
<i>7</i>&nbsp; * Recipe object for the coffee maker
<i>8</i>&nbsp; */
<b class="fc"><i>9</i>&nbsp;public class Recipe {</b>
<i>10</i>&nbsp;    private String name;
<i>11</i>&nbsp;    private int price;
<i>12</i>&nbsp;    private int amtCoffee;
<i>13</i>&nbsp;    private int amtMilk;
<i>14</i>&nbsp;    private int amtSugar;
<i>15</i>&nbsp;    private int amtChocolate;
<i>16</i>&nbsp;    
<i>17</i>&nbsp;    public int getAmtChocolate() {
<b class="nc"><i>18</i>&nbsp;        return amtChocolate;</b>
<i>19</i>&nbsp;    }
<i>20</i>&nbsp;    public void setAmtChocolate(int amtChocolate) {
<b class="fc"><i>21</i>&nbsp;    	if(amtChocolate &gt;= 0) {</b>
<b class="fc"><i>22</i>&nbsp;    		this.amtChocolate = amtChocolate;</b>
<i>23</i>&nbsp;    	}
<i>24</i>&nbsp;    	else {
<b class="nc"><i>25</i>&nbsp;    		this.amtChocolate = 0;</b>
<i>26</i>&nbsp;    	}
<b class="fc"><i>27</i>&nbsp;    }</b>
<i>28</i>&nbsp;    public int getAmtCoffee() {
<b class="nc"><i>29</i>&nbsp;        return amtCoffee;</b>
<i>30</i>&nbsp;    }
<i>31</i>&nbsp;    public void setAmtCoffee(int amtCoffee) {
<b class="fc"><i>32</i>&nbsp;    	if(amtCoffee &gt;= 0) {</b>
<b class="fc"><i>33</i>&nbsp;    		this.amtCoffee = amtCoffee;</b>
<i>34</i>&nbsp;    	}
<i>35</i>&nbsp;    	else {
<b class="nc"><i>36</i>&nbsp;    		this.amtCoffee = 0;</b>
<i>37</i>&nbsp;    	}
<b class="fc"><i>38</i>&nbsp;    }</b>
<i>39</i>&nbsp;    public int getAmtMilk() {
<b class="nc"><i>40</i>&nbsp;        return amtMilk;</b>
<i>41</i>&nbsp;    }
<i>42</i>&nbsp;    public void setAmtMilk(int amtMilk) {
<b class="fc"><i>43</i>&nbsp;    	if(amtMilk &gt;= 0) {</b>
<b class="fc"><i>44</i>&nbsp;    		this.amtMilk = amtMilk;</b>
<i>45</i>&nbsp;    	}
<i>46</i>&nbsp;    	else {
<b class="nc"><i>47</i>&nbsp;    		this.amtMilk = 0;</b>
<i>48</i>&nbsp;    	}
<b class="fc"><i>49</i>&nbsp;    }</b>
<i>50</i>&nbsp;    public int getAmtSugar() {
<b class="nc"><i>51</i>&nbsp;        return amtSugar;</b>
<i>52</i>&nbsp;    }
<i>53</i>&nbsp;    public void setAmtSugar(int amtSugar) {
<b class="fc"><i>54</i>&nbsp;    	if(amtSugar &gt;= 0) {</b>
<b class="fc"><i>55</i>&nbsp;    		this.amtSugar = amtSugar;</b>
<i>56</i>&nbsp;    	}
<i>57</i>&nbsp;    	else {
<b class="nc"><i>58</i>&nbsp;    		this.amtSugar = 0;</b>
<i>59</i>&nbsp;    	}
<b class="fc"><i>60</i>&nbsp;    }</b>
<i>61</i>&nbsp;    public String getName() {
<b class="fc"><i>62</i>&nbsp;        return name;</b>
<i>63</i>&nbsp;    }
<i>64</i>&nbsp;    public void setName(String name) {
<b class="fc"><i>65</i>&nbsp;        this.name = name;</b>
<b class="fc"><i>66</i>&nbsp;    }</b>
<i>67</i>&nbsp;    public int getPrice() {
<b class="nc"><i>68</i>&nbsp;        return price;</b>
<i>69</i>&nbsp;    }
<i>70</i>&nbsp;    public void setPrice(int price) {
<b class="fc"><i>71</i>&nbsp;    	if(price &gt;= 0) {</b>
<b class="fc"><i>72</i>&nbsp;    		this.price = price;</b>
<i>73</i>&nbsp;    	}
<i>74</i>&nbsp;    	else {
<b class="nc"><i>75</i>&nbsp;    		this.price = 0;</b>
<i>76</i>&nbsp;    	}
<b class="fc"><i>77</i>&nbsp;    } </b>
<i>78</i>&nbsp;    public boolean equals(Recipe r) {
<b class="fc"><i>79</i>&nbsp;        if(r.getName() == null) {</b>
<b class="fc"><i>80</i>&nbsp;	    	return false;</b>
<i>81</i>&nbsp;    	}	
<b class="nc"><i>82</i>&nbsp;        if(this.name == null) {</b>
<b class="nc"><i>83</i>&nbsp;        	return false;</b>
<i>84</i>&nbsp;        }
<b class="nc"><i>85</i>&nbsp;        if((this.name).equals(r.getName())) {</b>
<b class="nc"><i>86</i>&nbsp;            return true;</b>
<i>87</i>&nbsp;        }
<b class="nc"><i>88</i>&nbsp;        return false;</b>
<i>89</i>&nbsp;    }
<i>90</i>&nbsp;    public String toString() {
<b class="nc"><i>91</i>&nbsp;    	return name;</b>
<i>92</i>&nbsp;    }
<i>93</i>&nbsp;}
</div>
</div>

<div class="footer">
    
    <div style="float:right;">generated on 2014-04-26 20:19</div>
</div>
</body>
</html>
